Restore collapsed-by-default location dropdown#661
Merged
Conversation
The location/section dropdown now defaults to collapsed, expanding only the notebook and section groups along the path to the currently selected section. This restores the original picker behavior and makes long notebook lists navigable again. - flattenSections/flattenSectionGroups report whether their subtree holds the selected section so each heading collapses unless it is on the path - refreshSectionVisibility recomputes row visibility in a single pass that honors nested collapse state - default to the first available section (and reveal its path) when there is no stored selection or it no longer exists Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9058d22 to
76658d7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The location (notebook/section) dropdown rendered every notebook and section group fully expanded. Customers with many notebooks/section groups had to scroll through the entire flattened tree to find their target section.
In the original picker, the dropdown defaulted to collapsed and expanded only the notebook and section groups leading to the currently selected section. The V2/V3 unified-window rewrite of the picker lost that behavior.
Fix
Restore the collapse-by-default behavior in renderer.ts:
flattenSections/flattenSectionGroupsnow report whether their subtree contains the selected section, so each notebook/section-group heading collapses unless it sits on the path to that section.refreshSectionVisibility()recomputes row visibility from collapsed state in a single pass that tracks the shallowest collapsed depth, so nested collapse/expand is honored correctly. Section rows now carrydata-depth.Notes
🤖 Generated with Claude Code